
import { UISTATUS,BILLTYPECODE,AREA  } from '../../constance';

export default function(props, moduleId, key, value, changedrows, index, record, type, method) {

    if(key=='money'){
        let bodys = props.cardTable.getVisibleRows(AREA.cardBody_1);
        if(bodys!=null && bodys.length>0){
            let total = 0;
            bodys.forEach(element => {
                let strValue = element.values.money.value;
                total = total+ Number(strValue);
            });
            props.form.setFormItemsValue(AREA.cardHead, { ['count']: { value: total } });
            props.cardTable.setTableData(AREA.cardBody_2, { rows: [] });
        } 
    }
}
